#pragma once
#include <windows.h>
#include <filesystem>

namespace util
{
    namespace resource
    {
        typedef uintmax_t uintmax;
        struct BinFile
        {
            BinFile();
            char *data;
            uintmax size;
        };

        struct BmpFile {
            BITMAPFILEHEADER *fileHeader;
            BITMAPINFOHEADER *info;
            RGBQUAD (*rgb)[256];
            char * data;
            uintmax size;
            BmpFile();
            BmpFile(BinFile& bin);
            BmpFile(BinFile&& bin);
            void AsBinFile(BinFile& bin);
            static void AsBinFile(BmpFile&& bmp, BinFile& bin);
        };        

        void ReadBinFileFromStaticMemory(char *buf, BinFile& bfile, int index);

        void ReadBinFileFromStaticMemory(char *buf, BinFile*& arr_bfile, int start, int end);
    }
}